package com.ttsx.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ttsx.pojo.dto.cart.CartUpdateNumDTO;
import com.ttsx.pojo.entity.Cart;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author lucky
* @description 针对表【ttsx_cart(购物车表)】的数据库操作Service
* @createDate 2025-03-01 17:41:06
*/
public interface CartService extends IService<Cart> {

    Long getCartCount(Long userId);

    List<Cart> getByUserId(HttpServletRequest request);

    List<Cart> getByProductIds(List<Long> ids);

    Boolean updateNum(CartUpdateNumDTO cartUpdateNumDTO);

    List<Cart> getByCartIds(List<Long> cartIds);

    Cart getByCartId(Long cartId);

    Cart saveCart(Cart entity);
}
